package com.lwm.demo.service.impl;

import com.lwm.demo.dao.IAccountDAO;
import com.lwm.demo.pojo.AccountDO;
import com.lwm.demo.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liweimin
 * @date 2021/6/9 19:14
 * @since
 */
@Service("accountService")
public class AccountServiceImpl implements IAccountService {

    @Autowired
    private IAccountDAO accountDAO;


    @Override
    public List<AccountDO> findAll() {
        return accountDAO.findAll();
    }

    @Override
    public AccountDO findAccountById(Integer id) {
        return accountDAO.findAccountById(id);
    }

    @Override
    public int saveAccount(AccountDO accountDO) {
        return accountDAO.saveAccount(accountDO);
    }

    @Override
    public int deleteAccount(Integer id) {
        return accountDAO.deleteAccount(id);
    }

    @Override
    public int updateAccount(AccountDO accountDO) {
        return accountDAO.updateAccount(accountDO);
    }
}
